package svc

import (
	"super-mart/api/internal/config"
	"super-mart/martrpc/martrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	MartRpc martrpcclient.Martrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		MartRpc: martrpcclient.NewMartrpc(zrpc.MustNewClient(c.MartRpc)),
	}
}
